﻿Imports System
Imports System.Collections.Generic

Namespace System.Workflow.Activities.Rules
    Friend Class RuleState
        Implements IComparable
        ' Methods
        Friend Sub New(ByVal rule As Rule)
            Me.Rule = rule
        End Sub

        Private Function System.IComparable.CompareTo(ByVal obj As Object) As Integer Implements IComparable.CompareTo
            Dim state As RuleState = [TryCast](obj,RuleState)
            Dim num As Integer = state.Rule.Priority.CompareTo(Me.Rule.Priority)
            If (num = 0) Then
                num = -state.Rule.Name.CompareTo(Me.Rule.Name)
            End If
            Return num
        End Function


        ' Properties
        Friend Property ElseActionsActiveRules As ICollection([Of] Integer)
            Get
                Return Me.elseActionsActiveRules
            End Get
            Set(ByVal value As ICollection([Of] Integer))
                Me.elseActionsActiveRules = value
            End Set
        End Property

        Friend Property ThenActionsActiveRules As ICollection([Of] Integer)
            Get
                Return Me.thenActionsActiveRules
            End Get
            Set(ByVal value As ICollection([Of] Integer))
                Me.thenActionsActiveRules = value
            End Set
        End Property


        ' Fields
        Private elseActionsActiveRules As ICollection([Of] Integer)
        Friend Rule As Rule
        Private thenActionsActiveRules As ICollection([Of] Integer)
    End Class
End Namespace

